Keywords: MS PC DOS EXEC CHILD PROCESSES EXAMPLE PROGRAM TURBORUN
An example of a Turbo Pascal program that uses TURBORUN.COM to "spawn" a child process.
Additional notes by Allan Winston, 3/20/85:
Warning: You must be very careful how you generate the COM file for this program or any program you write that plans to use TURBORUN.COM. Don't even think of performing a compile-and-go! Instead, perform the following: (a) Make sure that whatever procedure in your program is equated to the external 'TURBORUN.COM' is the first procedure declared in your program; this assumption is critical to the success of the assembler language code in its stack computations. (b) Perform a memory compile (the default). (c) Use the Options command to change from a memory compile to a COM-file compile. While still in the Options screen, use the 'A' command to alter the mAximum free dynamic memory size to a small value; I recommend 400, which is the default for the mInimum free dynamic memory size -- this will correspond to 16K of memory. Now exit the Options Screen. (d) Perform another compile; this will produce an executable COM file. (e) Now exit TURBO entirely. (f) Whenever you wish, execute the COM file generated in step (d).
The total overhead for TRUN.COM, assuming 400 was used for the 'A' value in step (c) above, seems to be 28,400 bytes for TURBO PASCAL Version 2.
The most common return code you will get running TRUN is 1026, which correspond to file not found. Remember to specify the '.EXE' or '.COM' extension when specifying to program to execute.